#!/bin/bash

# bash chapter2/version-check.sh

# ERROR: Cannot find bison (Bison)
# ERROR: Cannot find gawk (Gawk)
# ERROR: Cannot find g++ (GCC (C++))
# ERROR: Cannot find m4 (M4)
# ERROR: Cannot find texi2any (Texinfo)
# ERROR: awk  is NOT GNU
# ERROR: yacc is NOT Bison
# ERROR: sh   is NOT Bash
# chapter2/version-check.sh: line 81: g++: command not found
# ERROR: g++ does NOT work

# 注释掉 因为执行过了
# sudo apt -y install bison
# sudo apt -y install gawk
# sudo apt -y install g++
# sudo apt -y install texinfo
# sudo rm -f /bin/sh
# sudo ln -s /bin/bash /bin/sh

# source chapter2/prepare.sh

# m4-1.4.19.sh ncurses-6.5.tar.gz bash-5.2.37.tar.gz coreutils-9.6.tar.xz diffutils-3.11.tar.xz file-5.46.tar.gz findutils-4.10.0.tar.xz gawk-5.3.1.tar.xz grep-3.11.tar.xz gzip-1.13.tar.xz make-4.4.1.tar.gz patch-2.7.6.tar.xz sed-4.9.tar.xz tar-1.35.tar.xz xz-5.6.4.tar.xz
set -e

for i in binutils-2.44.tar.xz gcc-14.2.0.tar.xz;
do
    /home/checx/projects/lfs/chapter5/build.sh $i 6
done